package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class RefCastOption implements UserDefinedTypeOption {

    private int beginIndex;
    private int endIndex;
    private CastToRef castToRef;
    private CastToType castToType;

    public RefCastOption(CastToRef castToRef, CastToType castToType) {
        this.beginIndex = castToRef != null ? castToRef.getBeginIndex() : castToType.getBeginIndex();
        this.endIndex = castToType != null ? castToType.getEndIndex() : castToRef.getEndIndex();
        this.castToRef = castToRef;
        this.castToType = castToType;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public CastToRef getCastToRef() {
        return castToRef;
    }

    public CastToType getCastToType() {
        return castToType;
    }

}
